New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ndhoule/pick

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ndhoule/pick

Create a shallow copy of an input object that contains only the specified properties.

2.0.0
latest
Source
npm
Version published
Maintainers
1
Created
Source

pick CI

Create a shallow copy of an input object that contains only the specified properties.

$ component install ndhoule/pick
$ npm install @ndhoule/pick

API

pick(props : string|string[], object: Object) => Object

Return a shallow copy of an input object containing only a specified list of properties.

var person = { name: 'Tim', occupation: 'enchanter', fears: 'rabbits' };

pick('name', person);
//=> { name: 'Tim' }

pick(['name', 'fears'], person);
//=> { name: 'Tim', fears: 'rabbits' }

License

Released under the MIT license.

Keywords

component

FAQs

Package last updated on 02 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts